<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2025/6/21
 * Time: 15:43
 */

namespace app\controller\sys;

use app\model\Web AS model;
use app\controller\Base;

class Web extends Base
{
    public function web(){
        $post = input('post.');
        $info = model::where('lang',$post['lang'])->find();
        if (!empty($info->id)) {
            foreach ($post AS $key => $value) {
                $info->save([$key => $value]);
            }
        }else{
            $post['uniqid'] = $this->getuniqid();
            model::create($post);
        }
//        if (!empty($post['web'])) @file_put_contents('./web.log',$post['web']);
        return $this->msg();
    }

    public function message(){

    }
}